import {GATEWAY_AXIOS} from './axios.js'

// GET - 查询全部记录
export function listApi() {
    return GATEWAY_AXIOS.get('/course/api/v1/clazz/list');
}

export function listClazzNameApi(params) {
    return GATEWAY_AXIOS.get('/course/api/v1/clazz/listClazzName?ids=' + params);
}

// GET - 查询在陪班级
export function listInTrainingApi() {
    return GATEWAY_AXIOS.get('/course/api/v1/clazz/listByStatus?statuses=0,1');
}

// POST - 分页查询记录
export function pageApi(params) {
    return GATEWAY_AXIOS.post('/course/api/v1/clazz/page', params);
}

// POST - 添加一条记录
export function saveApi(params) {
    return GATEWAY_AXIOS.post('/course/api/v1/clazz/save', params)
}

// PUT - 修改一条记录
export function updateApi(params) {
    return GATEWAY_AXIOS.put('/course/api/v1/clazz/update', params)
}

// POST - 删除一条记录
export function removeApi(id) {
    return GATEWAY_AXIOS.delete('/course/api/v1/clazz/remove/' + id);
}

// POST - 批量删除记录
export function removeBatchApi(ids) {
    return GATEWAY_AXIOS.delete('/course/api/v1/clazz/batchRemove?ids=' + ids);
}